<script setup>


</script>

<template>
  <header>
    <div class="user_maxbox">
      <div class="user_box">
        <div class="avatar">
          <img src="../assets/images/avatar01.jpg" alt="">
        </div>
        <div class="user_name">姓名:{{ userName }}</div>
        <div class="user_id">ID:{{ userId }}</div>
      </div>
    </div>
  </header>


</template>

<script>
import moment from 'moment';
import axios from 'axios';
import { ref } from 'vue';
import http from '@/util/http';
import Cfg from '@/util/config';
import { showLoadingToast, showConfirmDialog, showImagePreview, showToast, closeToast } from 'vant';
export default {
  // 组件选项
  data() {
    return {
      // 数据对象
      userName: '',
      userId: '',
    };
  },
  mounted() {
    // this.scrollToBottom();
    // console.log(history.state)
    this.userName = history.state.name;
    this.userId = history.state.userid;


  },
  created() {


  },
  beforeCreate() {

  },
  beforeUnmount() {

  },
  methods: {

  },

}
</script>

<style scoped>
.user_maxbox{
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user_box {
  width: 30%;
  border-radius: 20px;
  background-color: #e6ebf5;
  padding: 50px 0;
}

.user_box .avatar{
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user_box .avatar img{
  width: 96%;
  height: 96%;
  border-radius: 50%;
}

.user_box .user_name{
  width: 100%;
  text-align: center;
  margin-top: 30px;
  font-size: 20px;
  color: #333;
  font-weight: bold;
}

.user_box .user_id{
  width: 100%;
  text-align: center;
  margin-top: 10px;
  font-size: 20px;
  color: #333;
  font-weight: bold;
}
</style>
